unit FormParent;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs

  ,JvPlgIntf;

type
  TfrmParent = class(TForm)
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
     MainApp:IMyMainAppInterface;
  end;

var
  frmParent: TfrmParent;

implementation

{$R *.dfm}
uses VariableCommon;
procedure TfrmParent.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Dec(formNum);
end;

procedure TfrmParent.FormCreate(Sender: TObject);
begin
   Inc(formNum);
end;

end.
